
public class RPG {
   int x,y;
   String name;
	public void show()
	{
		System.out.println("���"+name+"��ǰλ��("+x+","+y+")");
	}
	public void move(char a)
	{
         if(a=='w' || a=='W')
         {
        	 y+=1;
        	 System.out.println("���"+name+"�����ƶ���ǰλ��("+x+","+y+")");
         }
         if(a=='d' || a=='D')
         {
        	 x+=1;
        	 System.out.println("���"+name+"�����ƶ���ǰλ��("+x+","+y+")");
         }
         if(a=='A' || a=='a')
         {
        	 x-=1;
        	 System.out.println("���"+name+"�����ƶ���ǰλ��("+x+","+y+")");
         }
         if(a=='S' || a=='s')
         {
        	 y-=1;
        	 System.out.println("���"+name+"�����ƶ���ǰλ��("+x+","+y+")");
         }
	}
}
